package com.icesoft.system.auth.entity;

import com.icesoft.system.entity.Account;
import com.icesoft.system.entity.BaseLoginUser;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Set;

@Getter
@Setter
@Accessors(chain = true)
public class LoginUser<T extends BaseLoginUser> implements Serializable {

	private Account account;

	private T user;

	private Set<String> roles;

	private Set<String> permissions;

	public LoginUser() {
	}

	public LoginUser(Account account, T user) {
		this.account = account;
		this.user = user;
	}

	public LoginUser(Account account, T user, Set<String> roles, Set<String> permissions) {
		this.account = account;
		this.user = user;
		this.roles = roles;
		this.permissions = permissions;
	}
}
